package cn.fatgod.learn.thymeleaf.ast.model;

import cn.hutool.core.util.StrUtil;

/**
 * 参数项
 */
public class ArgItem {

    /**
     * 参数值（文本表示）
     */
    private final String val;

    /**
     * 是否为字符串
     */
    private final boolean str;

    /**
     * 导入路径
     */
    private final String importPath;

    public static ArgItem create(String val) {
        return create(val, true, StrUtil.EMPTY);
    }

    public static ArgItem create(String val, boolean str, String importPath) {
        return new ArgItem(val, str, importPath);
    }

    private ArgItem(String val, boolean str, String importPath) {
        this.val = val;
        this.str = str;
        this.importPath = importPath;
    }

    public String getVal() {
        return val;
    }

    public boolean isStr() {
        return str;
    }

    public String getImportPath() {
        return importPath;
    }
}